import request  from '@/utils/request';

import { BASE_URL } from '@/config/query';

export async function queryPage(params = { pageSize: 10, pageNum: 1 }) {
  return request(`${BASE_URL}/device_flame/page`, params)
}

export async function queryInfoById(id) {
  return request(`${BASE_URL}/device_flame/detail/${id}`, null, 'get')
}

export async function create(params) {
  return request(`${BASE_URL}/device_flame/create`, params)
}

export async function update(params) {
  return request(`${BASE_URL}/device_flame/modify`, params)
}

export async function remove(id) {
  return request(`${BASE_URL}/device_flame/remove/${id}`, null, 'get')
}

export async function detailLocationPlan(id) {
  return request(`${BASE_URL}/floor_plan/detail/${id}`)
}

export async function queryBrand({ tail, ...res }) {
  return request(`${BASE_URL}/${tail}/list`, res)
}

export async function queryLocation({ tail, ...res }) {
  return request(`${BASE_URL}/${tail}/list`, res)
}